<template>
  <view class="good-list">
    <view class="item" v-for="(item, index) in goodList" :key="index" @click="goDetail()">
      <view class="pictrue">
        <image src="@/static/logo.png"></image>
      </view>
      <view class="txtPic">
        <view class="name ellipsis"> {{ item.store_name }}</view>
        <view class="bottom">
          <view class="money">
            {{ `￥` }}<text class="num">{{ item.price }}</text>
          </view>
          <view class="noBnt">{{ `去预约` }}</view>
        </view>
      </view>
    </view>
  </view>
</template>
<script lang="ts" setup>
import { onShow } from '@dcloudio/uni-app'
import { ref } from 'vue'
onShow(() => {
  console.log('ss')
})

withDefaults(
  defineProps<{
    goodList: Array<Record<string, any>>
  }>(),
  {
    goodList: () => [],
  },
)

const goDetail = () => {}
</script>

<style lang="scss" scoped>
.good-list {
  box-sizing: border-box;
  width: 100%;
  padding: 0 30rpx 30rpx;
  .item {
    margin-bottom: 40rpx;
    display: flex;
    // flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    .pictrue {
      width: 30%;
      height: 176rpx;
      border-radius: 16rpx;
      position: relative;

      image {
        width: 100%;
        height: 100%;
        border-radius: 16rpx;
      }
    }
    .txtPic {
      flex: 1;
      padding-left: 10upx;
      .name {
        font-size: 28rpx;
        color: #282828;
        &.on {
          color: #a3a3a3;
        }
      }

      .noBnt {
        width: 126rpx;
        height: 44rpx;
        background: #e93323;
        border-radius: 22rpx;
        text-align: center;
        line-height: 44rpx;
        font-size: 24rpx;
        margin-top: 10rpx;
        color: #ffffff;
      }

      .bottom {
        margin-top: 11rpx;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;

        .cartNum {
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          width: 120rpx;
          height: 60rpx;
          margin-top: 10rpx;
          .num {
            font-size: 24rpx;
            color: #282828;
          }
        }
        .money {
          font-weight: bold;
          font-size: 26rpx;
          color: #e93323;
          .num {
            font-size: 34rpx;
          }
        }
      }
    }
  }
}
</style>
